<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
    <title id="title"></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="public/assets/libs/layui/css/layui.css"/>

    <script type="text/javascript" src="public/assets/libs/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="public/assets/libs/q.js"></script>
    <script type="text/javascript" src="public/assets/libs/pandyle.min.js"></script>
    <script type="text/javascript" src="public/assets/libs/layui/layui.js"></script>
    <script type="text/javascript">document.write('<script src="public/module/version.js?v=' + new Date().getTime() + '"><\/script>');</script>
    <script type="text/javascript">
        layui.link('public/assets/css/admin.css?v=' + global_version);
        layui.link('public/assets/css/theme.css?v=' + global_version);
    </script>
</head>

<body class="layui-layout-body layui-hide">
<div class="layui-layout layui-layout-admin">
    <!-- 头部存放用户登录信息-->
    <div class="layui-header" p-com="header"></div>

    <!-- 左边菜单栏 关联 config.js  index.js side.html -->
    <div class="layui-side" p-com="side"></div>

    <!-- 主体部分 -->
    <div class="layui-body">
        <div class="layui-tab" lay-allowClose="true" lay-filter="admin-pagetabs">
            <ul class="layui-tab-title">
            </ul>
            <div class="layui-tab-content">
            </div>
        </div>
    </div>

    <!-- 底部 -->
    <div class="layui-footer">Copyright © 2019 YiXun All rights reserved. <span class="pull-right">Version 2.0</span>
    </div>

    <!-- 手机屏幕遮罩层 -->
    <div class="site-mobile-shade"></div>
</div>
<!--一个共用的字体图标库,有新的图标了路径了总是变-->
<link rel="stylesheet" href="//at.alicdn.com/t/font_1422335_q1vlsig98k.css"/>
<!--vue相关的文件-->
<link rel="stylesheet" href="public/assets/css/element-ui.css"/>
<script type="text/javascript" src="public/module/utils/vue.js"></script>
<script type="text/javascript" src="public/module/element/element-ui.js"></script>
<!--
<script type="text/javascript" src="public/assets/libs/zTree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="public/assets/libs/v5.3.0/ol.js"></script>-->
<script>
        layui.config({
            base: 'public/module/',
            version: true
        }).extend({
            formSelects: 'formSelects/formSelects-v4',
            treetable: 'treetable-lay/treetable',
            dropdown: 'dropdown/dropdown',
            notice: 'notice/notice',
            step: 'step-lay/step',
            dtree: 'dtree/dtree',
            citypicker: 'city-picker/city-picker',
            tableSelect: 'tableSelect/tableSelect',
            transferTable: 'transferTable/transferTable',
            _user: 'api/user',
            crypto: "utils/crypto",
            apexcharts: "echarts/apexcharts.min",
            uploader: "file/uploader",
            area: "area/area",
            inputTags: "inputTags/inputTags",
            autocomplete: "autocomplete/autocomplete",
        }).use(['config', 'index', 'element', '_user', 'tools'], function () {
            var config = layui.config;
            var index = layui.index;
            var element = layui.element;
            var tools = layui.tools;
            $("#title").text(config.title || '');//动态设置title
            // 检查是否登录
            if (!config.getToken() || $.isEmptyObject(config.getToken())) {
                tools.toLogin();
                return;
            }
            //显示body,避免页面显示一些边框,不友好
            $("body").removeClass('layui-hide');
            // 获取当前用户信息
            index.getUser(function (user) {
                console.log(JSON.stringify(user));
                $('.layui-layout-admin .layui-header').vm(user);
                index.initLeftNav();
                element.render('nav');
                index.bindEvent();
            });

        });

</script>
</body>

</html>